try!(file(&path.join("Cargo.toml"), format!(
r#"[package]
-
name = "{}"
version = "0.0.1"
authors = ["{}"]
# Cargo.toml
[package]
-
name = "hello-from-generated-code"
version = "0.0.1"
authors = ["you@example.com"]
# Cargo.toml
[package]
-
name = "hello-world-from-c"
version = "0.0.1"
authors = [ "you@example.com" ]
# literal string "$triple", and it will apply whenever that target triple is
# being compiled to.
[target]
-
# For cargo builds which do not mention --target, these are the ar/linker which
# are passed to rustc to use (via `-C ar=` and `-C linker=`). By default these
# flags are not passed to the compiler.
ar = ".."
linker = ".."
-
# Configuration keys related to the registry
[registry]
index = "..." # URL of the registry index (defaults to the central repository)
```toml
[package]
-
name = "hello_world"
version = "0.0.1"
authors = ["Your Name <you@example.com>"]
```toml
[package]
-
name = "hello_world"
version = "0.0.1"
authors = ["Your Name <you@example.com>"]
[dependencies.color]
-
git = "https://github.com/bjz/color-rs.git"
```
```toml
[package]
-
name = "hello_world"
version = "0.0.1"
authors = ["Your Name <you@example.com>"]
[dependencies.color]
-
git = "https://github.com/bjz/color-rs.git"
```
```toml
[dependencies.color]
-
git = "https://github.com/bjz/color-rs.git"
rev = "bf739419e2d31050615c1ba1a395b474269a4"
```
```toml
[package]
-
name = "hello_world"
version = "0.0.1"
authors = ["Your Name <you@example.com>"]
[dependencies.color]
-
git = "https://github.com/bjz/color-rs.git"
```
```toml
[package]
-
name = "conduit-static"
version = "0.0.1"
authors = ["Yehuda Katz <wycats@example.com>"]
[dependencies.conduit]
-
git = "https://github.com/conduit-rust/conduit.git"
```
```toml
[package]
-
name = "hello_world"
version = "0.0.1"
authors = ["Your Name <you@example.com>"]
name = "awesome"
[features]
-
# The "default" set of optional packages. Most people will
# want to use these packages, but they are strictly optional.
# Note that `session` is not a package but rather another
session = ["cookie/session"]
[dependencies]
-
# These packages are mandatory and form the core of this
# package's distribution
cookie = "1.2.0"
# ...
[lib]
-
# The name of a target is the name of the library that will be generated. This
# is defaulted to the name of the package or project.
name = "foo"
# ...
[lib]
-
name = "..."
# this could be "staticlib" as well
crate-type = ["dylib"]